package com.tuzhi.sys.service.impl;

import com.tuzhi.base.jpa.repository.BaseRepo;
import com.tuzhi.base.service.impl.AbsBaseService;
import com.tuzhi.sys.jpa.entity.UserRoleViewEntity;
import com.tuzhi.sys.jpa.entity.pk.UserRolePk;
import com.tuzhi.sys.jpa.repository.UserRoleViewRepo;
import com.tuzhi.sys.service.UserRoleViewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserRoleViewServiceImpl extends AbsBaseService<UserRoleViewEntity, UserRolePk> implements UserRoleViewService {
    @Autowired
    UserRoleViewRepo userRoleViewRepo;

    @Override
    protected BaseRepo getThisRepo() {
        return userRoleViewRepo;
    }


    @Override
    public List<UserRoleViewEntity> findByUserId(Long userId) {
        return userRoleViewRepo.findByUserId(userId);
    }
}
